import java.security.PublicKey;

public class Text2 {


    public static void move(char pos1,char pos2) {
        System.out.print(pos1+" -> "+pos2+" ");
    }

    public static void hanoi(int n, char pos1,char pos2,char pos3) {
        if(n == 1) {
            move(pos1,pos3);
            return;
        }
        hanoi(n-1,pos1,pos3,pos2);
        move(pos1,pos3);
        hanoi(n-1,pos2,pos1,pos3);
    }

    public static void main8(String[] args) {
        hanoi(3,'A','B','C');
    }




    public static int print(int n){
        if(n<10){
            System.out.println(n);
        }else {
            print(n / 10);
            System.out.println(n % 10);
        }
        return n;
    }

    public static void main6(String[] args) {
        System.out.println(print(1729));
    }

    public static void main(String[] args) {


    }



    public static int fac(int n){
        if(n == 1){
            return 1;
        }
        return n * fac(n - 1);
    }

    public static void main5(String[] args) {
        System.out.println(fac(5));
    }


    public static int add(int n){
        if(n == 1){
            return 1;
        }
        return n + add(n - 1);
    }

    public static void main4(String[] args) {
        System.out.println(add(10));
    }


    public static  int sum(int a,int b){
        return a + b;
    }
    public static double sum( double a,double b,double c){
        return a + b +c;
    }

    public static void main3(String[] args) {
        System.out.println(sum(4,5));
        System.out.println(sum(1.2,2.2,3.2));
    }

    public static int fib1(int n){
        int count = 0;
        if(n == 1 || n == 2){
            count++;
            return 1;
        }
        return fib1(n - 1) + fib1(n - 2);
    }

    public static int fib2(int n){
        if(n == 1 || n == 2){
            return 1;
        }
        int f1 = 1;
        int f2 = 1;
        int f3 = -1;

        for (int i = 3; i <=n ; i++) {
            f3 = f1 + f2;
            f1 = f2;
            f2 = f3;

        }
        return f3;
    }


    public static void main2(String[] args) {
        System.out.println(fib1(10));
    }







    public static int fun(int n){
        if(n < 10){
            return n;
        }
        return n % 10 + fun(n / 10);
    }

    public static void main1(String[] args) {
        System.out.println(fun(1729));

    }


}
